﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Data;
using System.Web.UI.WebControls;
using weikebuluo.Model;
using weikebuluo.DAL;
using weikebuluo.Common;

namespace weikeweixin.web.admin.wechat
{
    public partial class keywordlist : weikeweixin.web.admin.cs.adminbase
    {
        w_keyword_dal keyworddal = new w_keyword_dal();
        JsonOperate JsonOperate = new JsonOperate();
        protected void Page_Load(object sender, EventArgs e)
        {
            switch (Request.QueryString["action"]) {
                case "list":
                    list();
                    break;
                case "del":
                    del();
                    break;
            }
        }

        private void list() {
            DataTable dtkeyword = keyworddal.GetList("wechat_id=" + wechat_id).Tables[0];
            Response.Write(JsonOperate.TableToBasicJson(dtkeyword));
            Response.End();

        }
        private void del() {
            keyworddal.Delete(int.Parse(Request.QueryString["id"]));
        }
    }
}